import type { RouteObject } from 'react-router-dom'
import React from "react";
// const UserList = lazy(() => import('@/views/list/user'))
const Order = React.lazy(() => import("../../pages/order"));

export default [
  {
    meta: {
      title: 'route.list.root',
      icon: 'ant-design:hdd-filled',
    },
    children: [
      {
        path: '/list/user',
        element: <Order />,
        meta: {
          title: 'route.list.page1',
          auth: 'user.read',
        },
      },
      {
        path: '/list/user/detail',
        element: <Order />,
        meta: {
          title: 'route.list.detail1',
          hideInMenu: true,
          hideInSearch: true,
          activeMenu: '/list/user',
          mergeTabbarPath: '/list/user',
          auth: 'user.detail',
        },
      },

      {
        path: '/list/goods',
        element: <Order />,
        meta: {
          title: 'route.list.page2',
          auth: 'user.read',
        },
        children: [
          {
            path: '/list/goods/detail',
            element: <Order />,
            meta: {
              title: 'route.list.detail2',
              hideInMenu: true,
              hideInSearch: true,
              activeMenu: '/list/goods',
              mergeTabbarPath: '/list/goods',
              auth: 'user.detail',
            },
          },
        ],
      },
    ],

  }
] as RouteObject[]
